Skip to content

docs(azure-sa-backup): update docs, add outputs and validations#1158

Open
pablosanchezpaz wants to merge 25 commits into
mainfrom
add/azure-sa-backup-docs-v2
Open

docs(azure-sa-backup): update docs, add outputs and validations#1158
pablosanchezpaz wants to merge 25 commits into
mainfrom
add/azure-sa-backup-docs-v2

Conversation

@pablosanchezpaz
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the azure-sa-backup module documentation and examples to be terraform-docs driven (header/footer injection), and clarifies a few variable descriptions to better communicate intent and usage.

Changes:

  • Add terraform-docs scaffolding (docs/header.md, docs/footer.md, .terraform-docs.yml) and regenerate the module README.md.
  • Improve input variable descriptions (backup_resource_group_name, storage_account_id, lifecycle_policy_rule).
  • Add basic and comprehensive examples under _examples/, including a large YAML reference moved out of the generated README.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/azure-sa-backup/variables.tf Clarifies descriptions for key inputs; documents lifecycle_policy_rule as currently unused.
modules/azure-sa-backup/README.md Replaces/expands generated README content with overview, usage, examples links, and updated inputs table.
modules/azure-sa-backup/docs/header.md Adds terraform-docs header content (overview + basic example).
modules/azure-sa-backup/docs/footer.md Adds terraform-docs footer content (examples links, resource links, support).
modules/azure-sa-backup/.terraform-docs.yml Adds module-local terraform-docs configuration for README injection.
modules/azure-sa-backup/_examples/comprehensive/values.reference.yaml Adds a comprehensive, external YAML reference for module inputs.
modules/azure-sa-backup/_examples/comprehensive/README.md Documents the purpose/usage of the comprehensive YAML reference.
modules/azure-sa-backup/_examples/basic/README.md Adds a minimal “basic” example README describing what to replace/run.
modules/azure-sa-backup/_examples/basic/main.tf Adds a basic Terraform configuration wiring the module for file share backups only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azure-sa-backup/README.md Outdated
Comment thread modules/azure-sa-backup/README.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azure-sa-backup/README.md
Comment thread modules/azure-sa-backup/docs/header.md Outdated
Comment thread modules/azure-sa-backup/docs/header.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azure-sa-backup/outputs.tf Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azure-sa-backup/README.md Outdated
Comment thread modules/azure-sa-backup/docs/header.md Outdated
Comment thread modules/azure-sa-backup/docs/header.md Outdated
@JorgeIglesiasMosquera JorgeIglesiasMosquera linked an issue Apr 27, 2026 that may be closed by this pull request
@pablosanchezpaz pablosanchezpaz marked this pull request as ready for review April 30, 2026 15:36
@pablosanchezpaz pablosanchezpaz requested a review from a team as a code owner April 30, 2026 15:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azure-sa-backup/README.md Outdated
Comment thread modules/azure-sa-backup/docs/header.md Outdated
Comment thread modules/azure-sa-backup/README.md
Comment thread modules/azure-sa-backup/docs/header.md
Comment thread modules/azure-sa-backup/outputs.tf
Comment thread modules/azure-sa-backup/outputs.tf Outdated
Comment thread modules/azure-sa-backup/outputs.tf Outdated
Comment thread modules/azure-sa-backup/variables.tf
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azure-sa-backup/README.md
Comment thread modules/azure-sa-backup/variables.tf Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azure-sa-backup/docs/header.md
Comment thread modules/azure-sa-backup/outputs.tf
@JorgeIglesiasMosquera JorgeIglesiasMosquera changed the title docs(azure-sa-backup-docs): update docs docs(azure-sa-backup): update docs, add outputs and validations May 5, 2026
JorgeIglesiasMosquera and others added 2 commits May 5, 2026 09:07
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azure-sa-backup/docs/header.md
Comment thread modules/azure-sa-backup/outputs.tf
Comment thread modules/azure-sa-backup/README.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to +42
output "blob_backup_vault_principal_id" {
description = "Principal ID of the backup vault managed identity; null if `backup_blob` is not configured or no identity is defined."
value = var.backup_blob != null && var.backup_blob.identity_type != null ? azurerm_data_protection_backup_vault.this[0].identity[0].principal_id : null
}

output "file_share_backup_policy_id" {
description = "Resource ID of the file share backup policy; null if `backup_share` is not configured."
value = var.backup_share != null ? azurerm_backup_policy_file_share.this[0].id : null
}

output "blob_backup_role_assignment_id" {
description = "Role assignment ID granting the backup vault access to the storage account; null if `backup_blob` is not configured or no identity is defined."
value = var.backup_blob != null && var.backup_blob.identity_type != null ? azurerm_role_assignment.this[0].id : null
}
Comment on lines +11 to +14
- **Blobs (Data Protection)**: Backup vault, **blob backup policy**, optional **managed identity**, **role assignment** on the storage account for the vault identity, and a **blob backup instance**.

> ⚠️ **Known caveat**: Always set `backup_blob.identity_type` (for example, `SystemAssigned`) when enabling blob backup. The role assignment count uses `can(var.backup_blob.identity_type)`, which can evaluate to `true` even when the value is `null`; in that case plan/apply can fail when resolving `identity[0]`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

azure-sa-backup

3 participants